﻿#ifndef CONFIG_H
#define CONFIG_H
#include "src/helper/filehelper.h"
#include <QDir>
#include <QString>

namespace GLOBAL {
namespace PATH {
static const QString WORK            = QDir::currentPath();
static const QString TMP             = FileHelper::joinPath(WORK, "temp");
static const QString LOG_DIR         = FileHelper::joinPath(TMP, "qos/logs");
static const QString ERROR_CODE_PATH = ":/static/docs/errorcode.csv";
};   // namespace PATH

namespace SQLITE {
static const QString NAME = FileHelper::joinPath(PATH::TMP, "cos.db");
};

namespace SQL {
static const QString LOGIN_INFO_TABLE = ":/static/sql/login_info.sql";
};

namespace TABLES {
static const QString LOGIN_INFO = "login_info";
};
namespace VERSION {
static const QString MAJOR_CUSTOM   = "custom";
static const QString MAJOR_BUSINESS = "business";
static const QString JSON_PATH      = ":/static/versions/config_default.json";
};   // namespace VERSION
namespace ENV {
static const QString ENV_DEV   = "dev";
static const QString ENV_ALPHA = "alpha";
static const QString ENV_BETA  = "beta";
static const QString ENV_PRE   = "pre";
static const QString ENV_PROD  = "prod";
};   // namespace ENV
enum LOG_LEVEL
{
    LOG_TOTAL   = 0,
    LOG_DEBUG   = 1,
    LOG_INFO    = 2,
    LOG_WARNING = 3,
    LOG_ERROR   = 4,
    LOG_FATAL   = 5
};
static const QStringList LOG_NAMES = QStringList() << "TOTAL"
                                                   << "DEBUG"
                                                   << "INFO"
                                                   << "WARNING"
                                                   << "ERROR"
                                                   << "FATAL";
}   // namespace GLOBAL
#endif   // CONFIG_H
